import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "Authorize/"
import { getBaseUrl } from "@/utils/appUrls.js"

//用户授权登录
export function Token(data, path) {
    return http.post({
        url: getBaseUrl() + serviceName + "Token" + path,
        data,
    })
}
//用户授权登录
export function SubmitRegister(data, path = "") {
    return http.post({
        url: getBaseUrl() + serviceName + "SubmitRegister" + path,
        data,
    })
}
//微信注册登录
export function registerByWeixin(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "registerByWeixin?open_id=" + data.open_id,
        data,
    })
}
//微信注册登录
export function RegisterAndLogin(data, path) {
    return http.post({
        url: getBaseUrl() + serviceName + "RegisterAndLogin" + path,
        data,
    })
}
